<template>
  <a-card>
    <template #title>
      <span class="icon"></span>
      <span class="text">常见应用</span>
    </template>
    <div v-for="(item, index) in taskInfo" :key="index" class="item">
      <div :class="item.imgclass"></div>
      <div class="text">{{ item.content }}</div>
    </div>
  </a-card>
</template>

<script lang="ts" setup>
import { ref, onMounted } from "vue";

const taskInfo = ref([]);
const fetchData = () => {
  taskInfo.value = [
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
    {
      content: "网上选课",
      imgclass: "WSXK",
    },
  ];
};
onMounted(() => {
  fetchData();
});
</script>

<style lang="less">
.arco-card {
  width: 100%;
  height: 300px !important;
  margin: 1% auto;
  background: #fff;
  border-radius: 10px;

  .arco-card-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: start !important;
    height: 84%;
    overflow: auto;
  }

  .arco-card-header-title {
    display: flex;
    align-items: center;

    .icon {
      display: inline-block;
      width: 18px;
      height: 18px;
      margin-right: 8px;
      background: url("@/assets/images/计划.png") center center no-repeat;
      background-size: contain;
    }

    .text {
      font-family: SourceHanSansSCVF-Medium;
      font-size: 18px;
      font-weight: 500;
      line-height: 20px;
      color: #9caaba;
    }
  }

  .item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    width: 25%;
    height: 50%;

    .WSXK {
      width: 40px;
      height: 40px;
      background: url("@/assets/images/考试安排.png") center center no-repeat;
      background-size: contain;
    }
  }
}
</style>
